package com.jic.order.enums;

/**
 * @author xuyongliang
 * @version V1.0
 * @className AfterSaleOperateTypeEnum
 * @description 售后操作类型
 * @date 2020/2/11
 */
public enum  AfterSaleOperateTypeEnum {
    // 操作类型, 1010:申请退款待处理1020:取消售后1030:审核通过1040:审核拒绝1050:审核后取消售后1060:退款中1070:退款成功'
    APP_REFUND(1010, "申请售后待处理"),
    CANCEL_AFTER_SALE(1020, "取消售后"),
    audit_pass(1030, "审核通过"),
    audit_reject(1040, "审核拒绝"),
    post_audit_CANCEL_AFTER_SALE(1050, "审核后取消售后"),
    REFUNDING(1060, "退款中"),
    REFUND_SUCCESS(1070, "退款成功");

    private Integer code;

    private String message;

    AfterSaleOperateTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public AfterSaleOperateTypeEnum getByCode(Integer code){
        AfterSaleOperateTypeEnum[] values = AfterSaleOperateTypeEnum.values();
        for(AfterSaleOperateTypeEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
